<#include "/default/utils/ui.ftl"/>
<@layout channel.name>

    <ol class="breadcrumb ">
        <li title="发布时间排序" <#if order == 'newest'> class="active" </#if>>
            <a href="?order=newest">最近</a>
        </li>
        <li title="点赞数排序" <#if order == 'favors'> class="active" </#if>>
            <a href="?order=favors">投票</a>
        </li>
        <li title="评论次数排序" <#if order == 'hottest'> class="active" </#if>>
            <a href="?order=hottest">热门</a>
        </li>
    </ol>
    
    <@contents channelId=channel.id pn=pn order=order>
        <ul class="list-group row topic-list">
            <#list results.content as row>
                <li class="list-group-item media col-md-6" style="margin-top: 0px;">
                    <a class="reply_last_time hidden-xs meta" href="${base}/view/${row.id}">
                        <span class="stress">${row.views}</span> 浏览<span> ⋅ </span>${row.comments} 回复
                    </a>

                    <div class="avatar pull-left">
                        <a href="${base}/users/${row.author.id}">
                            <img class="media-object img-thumbnail avatar avatar-middle"
                                 src="${base + row.author.avatar}">
                        </a>
                    </div>

                    <div class="infos">
                        <div class="media-heading">
                            <@classify row/>
                            <#if row.html ==''> 
                                	<a href="${base}/view/${row.id}">${row.title?html}</a>
                            <#else>
                                	<a href="${base}/${row.html}">${row.title?html}</a>
                            </#if>
                        </div>
                    </div>
                </li>
            </#list>
        </ul>
        <div class="row" style="width:100%; text-align:center;">
	        <!-- Pager -->
	        <@pager request.requestURI!"", results, 5/>
	    </div>
    </@contents>

</@layout>

